Part Number Hot Search : 
GMF71020 16080 SRA1050 1747498 1N4004 SM79164 000X1 HDSP316Y
Product Description
Full Text Search
 

To Download SW1-SW16 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ? rej05b0812-0120 rev.1.20 2007.11 page 1 of 18 application notes m16c/26a group sample program (electronic desktop calculator) 1. summary this sample program provides the functionalit y of an electronic desktop calculator by using the renesas starter kit for m16c/26 a (r0k33026as000be) and an extension board.  2. introduction the example described in this document appl ies to the microcomputers listed below: microcomputers: m16c26a this sample program runs on the renesas starter kit for m16c/26a (r0k33026as000be). prepare an extension board available for the renesas starter kit or create a circuit similar to the one shown in the circuit di agram on page 15 and then connect it to the starter kit. this program uses rsk_lib. for details a bout rsk_lib, see the rsk_lib reference ma nual. (rsk_lib is the library software provided for use with the renesas starter kit for m16c/26a.) the extension board used here is a product from pi system co., ltd. input key calculation result display
? rej05b0812-0120 rev.1.20 2007.11 page 2 of 18 m16c/26a group sample program (electronic desktop calculator) 3. port arrangement the key matrix and the buzzer are the facilit ies mounted on an extension board for the renesas starter kit. to use these facili ties, connect an extension board to the starter kit. ? ? ? ? ? ? ? ? c a l c 0 10mhz lcd p74 xin p60 p61 p62 p63 p90 p91 lcd e lcd rs lcd d7 lcd d6 lcd d5 lcd d4 m30260f8agp p75 p76 p77 key matrix p104 p105 p106 p107
? rej05b0812-0120 rev.1.20 2007.11 page 3 of 18 m16c/26a group sample program (electronic desktop calculator) 4. operational outline calculation results are shown on liquid crystal display. the display shows the result of operation when calculation results are within 7 digits (from ? 9999999 to 9999999) or ?e? when calculation results are equal to or more than 8 digits. for example, when you enter ?1234 ? 5678 =,? the display wi ll show ?6912.? or when you enter ?1234567 ? 8901234,? the display will show ?e.? when a key is depressed, the buzzer sounds. note: in this program, pressing two or more switches at the same time has no effect (i.e., ignored). this function is materialized using the following microcomputer facilities: ? timer a0 (timer mode, main 2 ms cycle) this timer counts 2 milliseconds using the main clock of the microcomputer as the count source. it is used as the basic timer of rsk_lib. time management, key scan, and lcd display management are perform ed using this timer. ? timer a1 (pulse modulation mode, buzzer output) this timer outputs a waveform w ith different high and low pulse widths using th e main clock of the microcomputer as the count source. it is used to sound a buzzer each time a key is touched.
? rej05b0812-0120 rev.1.20 2007.11 page 4 of 18 m16c/26a group sample program (electronic desktop calculator) 5. operational specification example for 1 ? 20 = 21 (1) the display shows the string ?calc? and the numeral ?0? immediately after the reset switch is pressed. (2) the ?1? key is entered. (3) the ? ? ? key is entered. (4) the ?2? key is entered. cal c 0 7 8 9 4 ? 6 1 2 3 0 5 = + ac - shows the numeral ?1? cal c 1 7 8 9 4 ? 6 1 2 3 0 5 = + ac - cal c 1 7 8 9 4 ? 6 1 2 3 0 5 = + ac - ? ? ? ? ? ? ? ? 2 shows the numeral ?2? cal c 7 8 9 4 ? 6 1 2 3 0 5 = + ac -
? rej05b0812-0120 rev.1.20 2007.11 page 5 of 18 m16c/26a group sample program (electronic desktop calculator) (5) the ?0? key is entered. (6) the ?=? key is entered. (7) the ?ac? key is entered. 20 shows the numeral ?20? cal c 7 8 9 4 ? 6 1 2 3 0 5 = + ac - 21 shows the calculation result cal c 7 8 9 4 ? 6 1 2 3 0 5 = + ac - 0 clears the display cal c 7 8 9 4 ? 6 1 2 3 0 5 ? = + ac -
? rej05b0812-0120 rev.1.20 2007.11 page 6 of 18 m16c/26a group sample program (electronic desktop calculator) 6. definition of the rsk functionality and the rs k_lib apis and common functions used by the calculator 6.1 definition of the rsk functionality rskdefine.h file in this application, the following functionalities (those shown in red) are set. individual definition of each selected functionality. /********************************************************* the boot information on cpu is defined usually, th is mode is used *********************************************************/ #define _cpu_m16c26a_normal_mod /* use in low power mode can be performed. */ //#define _cpu_m16c26a_32khz_mod /* use of access of a flash can be performed. */ //#define _cpu_m16c26a_dataflasf_use /******************************************************** the hardware function wh ich rsk supports is chosen /********************************************************/ #define _use_key #define _use_buzzer //#define _option_use_ad //#define _option_use_com_rx //#define _option_use_com_tx //#define _opti on_use_infraedrx //#define _opti on_use_infraedtx //#define _option_use_sw //#define _option_use_led //#define _option_use_io #if defined _use_key /* a key matrix continues pushing and existence is defined.*/ /*when not using -use_key_c ontinu is made a comment. */ //#define _use_key_continu #if defined _use_key_continu #else #define _continu_sw1 _key_conteinu_off #define _continu_sw2 _key_conteinu_off #define _continu_sw3 _key_conteinu_off #define _continu_sw4 _key_conteinu_off #define _continu_sw5 _key_conteinu_off #define _continu_sw6 _key_conteinu_off #define _continu_sw7 _key_conteinu_off #define _continu_sw8 _key_conteinu_off #define _continu_sw9 _key_conteinu_off #define _continu_sw10 _key_conteinu_off #define _continu_sw11 _key_conteinu_off #define _continu_sw12 _key_conteinu_off #define _continu_sw13 _key_conteinu_off #define _continu_sw14 _key_conteinu_off #define _continu_sw15 _key_conteinu_off #define _continu_sw16 _key_conteinu_off #endif continuous key depression is not used in this a pp lication.
? rej05b0812-0120 rev.1.20 2007.11 page 7 of 18 m16c/26a group sample program (electronic desktop calculator) 6.2 apis and common functions used apistatustype rl_settimerreq( unsigned int timervalue, char timermode, int *timerno, int *ercode ); apistatustype rl_starttimer( int timerno, int *ercode ); apistatustype rl_checktimer( int timerno, int *ercode ); apistatustype rl_get_key( int *inkey, int *ercode ); apistatustype rl_start_buzzer( char freqno, int *ercode ); apistatustype rl_stop_buzzer( int *ercode ); apistatustype rl_putc_lcd( char ylocation, char outc, int *ercode ); apistatustype rl_puts_lcdloc( char xlocation, char ylocation, char rvtime, const char far* outc, int *ercode ); void rl_lengthcpy( char *dest, char far *strm, char len ); void rl_errorhook( int funcno, int errorno ); for details about the apis and co mmon functions used by the sample program (ele ctronic desktop calculator), see the renesas sta rter kit library v.1.00 reference manual.
? rej05b0812-0120 rev.1.20 2007.11 page 8 of 18 m16c/26a group sample program (electronic desktop calculator) 7. flowchart electronic desktop clear display on lcd request timer setup start timers show the initial screen input keys process calculations process calculation results process buzzer
? rej05b0812-0120 rev.1.20 2007.11 page 9 of 18 m16c/26a group sample program (electronic desktop calculator) 8. tutorial 1 launch the hew by double-clicking its icon. 2 change the session name from ?default session? to ?sessionm16c_e8_system.?
? rej05b0812-0120 rev.1.20 2007.11 page 10 of 18 m16c/26a group sample program (electronic desktop calculator) 3 select ?m30260f8a? for device. select ?download emulat or firmware? for mode.
? rej05b0812-0120 rev.1.20 2007.11 page 11 of 18 m16c/26a group sample program (electronic desktop calculator) check the box labeled ?power supply is carried out. (max 300ma)? and then select ?5.0v.?
? rej05b0812-0120 rev.1.20 2007.11 page 12 of 18 m16c/26a group sample program (electronic desktop calculator) 4 in the program and the work ram text boxes of firmware location address, enter ?f a0? and ?0b8? respectively. leave the box labeled ?debug a progr am using the wdt? unchecked.
? rej05b0812-0120 rev.1.20 2007.11 page 13 of 18 m16c/26a group sample program (electronic desktop calculator) 5 choose dow nload from the debug tab and download a module. the upper-side choices for download show the location from which a pr oject was downloaded.
? rej05b0812-0120 rev.1.20 2007.11 page 14 of 18 m16c/26a group sample program (electronic desktop calculator) 6 click ?start after reset? to start program execution. 7 please do "cancellation" when "t he file is opened" window opens.
? rej05b0812-0120 rev.1.20 2007.11 page 15 of 18 m16c/26a group sample program (electronic desktop calculator) 9. circuit diagram 10. part list part name part no. q?ty manufact urer type number value remark tact switch sw1 -sw16 16 omron b3fs-1000p switching diode d2 - d5 4 rohm 1ss355te-17 pcb header ja1,ja2 2 molex 10-88-1261 26- pin male, 2-row, vertical type
? rej05b0812-0120 rev.1.20 2007.11 page 16 of 18 m16c/26a group sample program (electronic desktop calculator) 11. web sitet renesas technology web site http://www.renesas.com/
? rej05b0812-0120 rev.1.20 2007.11 page 17 of 18 m16c/26a group sample program (electronic desktop calculator) revision history content of revision rev. date of issue page points 1.00 2006.06.30 - first revision issued 1.10 2007.07.12 - contents of presentation improved 1.20 2007.11.29 - rsk_lib apis supported
? rej05b0812-0120 rev.1.20 2007.11 page 18 of 18 m16c/26a group sample program (electronic desktop calculator)


▲Up To Search▲   

 
Price & Availability of SW1-SW16

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X